{% extends 'base.html' %}

{% block css %}
    <link rel="stylesheet" href="/static/css/host.css">
{% endblock %}

{% block content %}
    <section class="content-header">
        <h1>
            机房详情
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-server"></i> 资产管理</a>
            <li><a href="{% url 'assets:idc_list' %}"> 机房</a></li>
            <li class="active"><a href="#">机房详情</a></li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <!-- Small boxes (Stat box) -->
        <div class="row">
            <div class="col-md-12">
                <div class="box box-warning">
                    <div class="box-header with-border">
                        <h1 class="box-title" style="font-size: 25px;">{{ idc.name }}</h1>
                        <a href="{% url 'assets:idc_edit' idc.pk %}" class="pull-right"><button class="btn btn-primary">修改主机配置</button></a>
                    </div>
                    <div class="box-body">
                        <div class="form-horizontal">
                        <div class="col-md-6">
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    机房名：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.name }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    机房地址：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.address }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    机房电话：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.phone }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    管理人：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.manage_user }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    所在网段：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.network }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    运营商：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.get_operator_display }}{{ idc.level }}</b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    描述：
                                </div>
                                <div class="col-md-8 hos">
                                    <b>{{ idc.description }}</b>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
            </div>
        </div>
    </section>
{% endblock %}

{% block js %}
    <script>
        $(document).ready(function () {
            $('#g-2').addClass('active');
            $('#g-2-3').addClass('active');
        });
    </script>
{% endblock %}